import React from 'react';
import { Contest } from '@/types/contest';
import MarkdownEditor from '@/components/MDEditor';
import styles from '../Detail.module.css';

interface ContestDescriptionProps {
  contest: Contest;
}

const ContestDescription: React.FC<ContestDescriptionProps> = ({ contest }) => {
  return (
    <div className={styles.descriptionSection}>
      {contest.description ? (
        <MarkdownEditor
          value={contest.description}
          preview="preview"
          readOnly
        />
      ) : (
        <div style={{ padding: '20px', textAlign: 'center', color: '#999' }}>
          暂无比赛描述内容
        </div>
      )}
    </div>
  );
};

export default ContestDescription; 